//
//  Datai4TableViewCell.m
//  项目二
//
//  Created by rimi on 16/5/20.
//  Copyright © 2016年 objective. All rights reserved.
//

#import "Datai4TableViewCell.h"

@implementation Datai4TableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self initUI];
    }
    return self;
}

//初始化控件
- (void)initUI {
    //初始化头像
    _logoImageView = [[UIImageView alloc] initWithFrame:CGRectMake(15, 10, 50, 50)];
    //投影
    _logoImageView.layer.shadowColor = [UIColor blackColor].CGColor;
    _logoImageView.layer.shadowOpacity = 0.8;
    _logoImageView.layer.shadowOffset = CGSizeMake(3, 3);
    //问题，两种加载方式有何区别？
    //    [self addSubview:_logoImageView];
    [self.contentView addSubview:_logoImageView];
    
    //初始化标签
    _vegeTitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_logoImageView.frame) + 35, 20, 200, 30)];
    _vegeTitleLabel.font = [UIFont systemFontOfSize:16];
    [self.contentView addSubview:_vegeTitleLabel];
}

@end
